package com.lankystar.logistucs.spring.controller;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.lankystar.logistucs.spring.entity.User;
import com.lankystar.logistucs.spring.service.OrderService;

@Controller
@RequestMapping(value="/oneOrder")
public class OneOrderController {
/**
 * 司机
 */
	@Autowired
	private OrderService orderService;
	
	@RequestMapping(value="updateOneOrder.do")
	public String updateOneOrder(HttpSession ses,Integer oneStatusKey){
		try {//司机
			User user = (User) ses.getAttribute("userSession");
			orderService.updateOneOrder(user, oneStatusKey);
		} catch (Exception e) {
			System.err.println("司机更新订单状态失败！！");
		}
		return "/broker/brokerlist";
	}
}
